<template>
<van-popup v-model="manage.show" position="bottom" :style="{ height: '100%' }">
  <div class="page">
    <van-nav-bar title="管理员信息" left-arrow @click-left="$router.go(-1)"/>
    <van-form ref="form">
      <van-field readonly label="代理名称"  :value="manage.info.agentName"/>
      <van-field readonly label="代理账号"  :value="manage.info.agentUserName"/>
      <van-field readonly label="代理ID"    :value="manage.info.agentUserId"/>
      <van-field readonly label="管理员名称" :value="manage.info.shopManagerName"/>
      <van-field readonly label="管理员账号" :value="manage.info.shopManagerUserName"/>
      <van-field readonly label="管理员ID"  :value="manage.info.shopManagerId"/>
    </van-form>
    <div style="margin: 1rem 16px 16px;">
      <van-button block type="info" @click="$router.go(-1)">关闭</van-button>
    </div>
  </div>
</van-popup>  
</template>

<script>
import DeviceInfo from '../Device/DeviceInfo.vue';
import AddShop from '../Mine/AddShop.vue';
export default {
  components: { DeviceInfo, AddShop },
  data() {
    return {
      manage: {
        show: true,
        info: {},
        showBlank: (shopId) => {
          this.$axios.get('/api/ShopManageController/shopOwnership', { 
            shopId 
          }).then(res => {
            this.manage.info = res;
            this.manage.show = true;
          });
        }
      }
    };
  },
  created() {
    this.manage.showBlank(this.$route.query.shopId);
  }
};
</script>

<style lang="less">
</style>
